<?php

namespace api\finance\controller;

class AdminMoneyCashController extends \Aaa\finance\controller\AdminMoneyCashController {

    public $baseField = [
        [
            'field' => 'id',
            'name' => 'ID',
        ],
        [
            'field' => 'status',
            'name' => '状态',
            'type' => 'radio',
            'options' => [
                ['name' => '等待受理', 'value' => 0],
                ['name' => '拒绝申请', 'value' => 1],
                ['name' => '支付失败', 'value' => 2],
                ['name' => '付款成功', 'value' => 3],
            ],
        ],
        [
            'field' => 'user_id',
            'name' => '用户',
        ],
        [
            'field' => 'bank',
            'name' => '支付平台',
        ],
        [
            'field' => 'name',
            'name' => '姓名',
        ],
        [
            'field' => 'account',
            'name' => '账号',
        ],
        [
            'field' => 'amount',
            'name' => '提现金额',
        ],
        [
            'field' => 'amount_received',
            'name' => '到账金额',
        ],
        [
            'field' => 'fee',
            'name' => '手续费',
        ],
        [
            'field' => 'free_withdrawal_amount',
            'name' => '免费提现额度',
        ],
        [
            'field' => 'create_time',
            'name' => '提现时间',
            'type' => 'time',
        ],
        [
            'field' => 'update_time',
            'name' => '受理时间',
            'type' => 'time',
        ],
        [
            'field' => 'reason',
            'name' => '拒绝理由',
        ],
        [
            'field' => 'editor',
            'name' => '操作人',
        ],
        [
            'field' => 'subsite',
            'name' => '分站',
        ],
    ];

    public function beforeIndex() {
        $this->searchField = [
            'common' => [
                'id' => 'accurate',
                'status' => 'accurate',
                'user_id' => 'accurate',
                'bank' => 'accurate',
                'name' => 'fuzzy',
                'account' => 'fuzzy',
                'editor' => 'accurate',
                'reason' => 'fuzzy',
                'subsite' => 'accurate',
            ],
            'time' => ['create_time', 'update_time',],
            'amount' => ['amount', 'amount_received', 'fee', 'free_withdrawal_amount',],
        ];
    }

}
